<?php defined('SYSPATH') OR die('No direct access allowed.');

class Invite_Controller extends Template_Controller 
{
	public $template = 'invite';
	public $content = 'invite_content';
	
	public function __construct()
	{
		parent::__construct();
	}

	public function index()
	{
		$this->template->title = 'Welcome to Fitness!';
	}

	public function r($id)
	{
		$cookie_params = array(
		   'name'   => 'invite_id',
		   'value'  => $id,
		   'expire' => '604800', // 7天时间
		   );
		cookie::set($cookie_params);
		url::redirect('/users/new');
	}
}
